package org.htmlparser.filters;

import java.util.Locale;
import org.htmlparser.Node;
import org.htmlparser.NodeFilter;
import org.htmlparser.Tag;

public class TagNameFilter
  implements NodeFilter
{
  protected String mName;

  public TagNameFilter()
  {
    this("");
  }

  public TagNameFilter(String paramString)
  {
    this.mName = paramString.toUpperCase(Locale.ENGLISH);
  }

  public boolean accept(Node paramNode)
  {
    int i;
    if ((paramNode instanceof Tag) && (!(((Tag)paramNode).isEndTag())) && (((Tag)paramNode).getTagName().equals(this.mName)))
      i = 1;
    while (true)
    {
      return i;
      i = 0;
    }
  }

  public String getName()
  {
    return this.mName;
  }

  public void setName(String paramString)
  {
    this.mName = paramString;
  }
}